home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / April 96 / Creating New Frames in ODF with < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.0 KB  |  [TEXT/ttxt]

  1. Subject:     Creating New Frames in ODF with Request EmbeddedFrame
  2. Sent:        4/17/96 3:22 PM
  3. Received:    4/17/96 3:41 PM
  4. From:        Jerome Jahnke, j-jahnke@uchicago.edu
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. How come I don't get a new frame with this? TempFrame turns up empty and my
  9. parts NewFrame never gets called. Clearly something is wrong and I have no
  10. doubt it is something rather simple, if someone could give me a hand I
  11. would greatly appreciate it.
  12.  
  13. void CDataAndMoviePart::NewMovieFrame( Environment *ev, CMovieFrame *RefFrame )
  14. {
  15.         FW_CRect        frameRect = RefFrame->GetBounds( ev );
  16.         FW_CRect        contentRect(frameRect);
  17.  
  18.         contentRect.Place( FW_kZeroPoint);
  19.  
  20.         contentRect.top = frameRect.bottom + FW_IntToFixed(0);
  21.         contentRect.bottom = contentRect.top + FW_IntToFixed(50);
  22.  
  23.         ODSession       *session = GetSession(ev);
  24.         ODFrame         *ContainingFrame = RefFrame->AcquireContainingFrame(ev);
  25.         ODPart          *ContainingPart = ContainingFrame->AcquirePart(ev);
  26.         ODFrame         *tempFrame;
  27.  
  28.         tempFrame = ContainingPart->RequestEmbeddedFrame(
  29.                  ev,
  30.                  ContainingFrame,
  31.                  RefFrame->GetODFrame(ev),
  32.                  ::FW_NewODShape( ev, contentRect ),
  33.                  GetODPart(ev),
  34.                  gViewAsFrameToken,
  35.                  session->Tokenize(ev,kDebugPresentation),
  36.                  FALSE );
  37. }
  38.  
  39. Jer,
  40.  
  41. ------------------------------------------------------------------------------
  42. Jerome Jahnke          |Well, I was only a kid didn't know enough to be afraid
  43. BSD Academic Computing |Playing the game, but not the way the big boys played
  44. University of Chicago  |Nothing to lose maybe I had something to trade
  45. j-jahnke@uchicago.edu  |The way the big wheel spins * The Big Wheel -- N Peart
  46. ----------------------------------------------------------------------------
  47. --
  48.  
  49.